-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move some Device methods to private section #16259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Great, thank you! Couple requests:
- Remove the debug comments before merge.
- It would also be helpful to have a list of the methods removed and methods switched from public->private in the PR description since it's hard to see in the diff.
std::unordered_set<chip_id_t> get_ethernet_connected_device_ids() const { | ||
return tt::Cluster::instance().get_ethernet_connected_device_ids(this->id_); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a number of these kind of methods that just reach into tt::Cluster::instance()
to do the lookup. We should be able to strip these methods from Device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There are also 32 allocator related methods in device.
But before acting on this, must align with stakeholders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as long as the review comments are removed prior to merge. Review/discussions of the api choice/design can happen later if we're just interested in getting this part of the cleanup merged first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add a couple nodiscards to some apis. in this pr.
Not doing this in this PR, keeping the scope down. |
### Ticket None ### Problem description There are plenty of Device methods which are only used by device itself but they are in a public section This PR depends on #16256 ### What's changed This PR does not add any new functionality, nor changes existing. It shuffles things around. * Moved near every method thats only used by Device to the private section (19) * Re-groupped methods logically: methods that proxy to allocator, to cluster * Moved a couple implementations to cpp * Reviewed usage of some methods, left comments where its desirable to review usage with owners * Removed template where it was not used Whats next: * Discuss and align what we can/want to do about the two outlined groups of methods * Review notes with owners, align on next steps ### Checklist - [ ] [Post commit CI](https://github.com/tenstorrent/tt-metal/actions/runs/12475902305)
Ticket
None
Problem description
There are plenty of Device methods which are only used by device itself but they are in a public section
This PR depends on #16256
What's changed
This PR does not add any new functionality, nor changes existing. It shuffles things around.
Whats next:
Checklist